package com.hqyj.ctxp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hqyj.ctxp.pojo.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface CategoryMapper extends BaseMapper<Category> {

    //展示商品种类信息
    Page<Category> selectCategoryAll(@Param("categoryName")String categoryName,@Param("page")Page<Category> page);

    //删除商品种类信息
    @Delete("DELETE FROM category WHERE category_id = #{categoryId}")
    Integer deleteCategoryById(Integer categoryId);

}
